<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-if指令</title>
</head>
<body>
    <div id="app">
        <h1 v-if="yes">Yes</h1>
        <h1 v-if="age >= 25">老头：{{age}}</h1>
        <h1 v-if="name.indexOf('jack') >= 0">Name :{{name}}</h1>
    </div>
</body>
<script src="https://cdn.bootcss.com/vue/2.2.6/vue.js"></script>
<script>
     var exampleData ={
         message : 'hi vue'
     }
     new Vue({
         el: '#app',
         data : {
             yes:true,
             age:29,
             name:'lemon'
         }
     })

</script>
</html>